{% extends "base.volt" %}
{% block pageFooter%}
<script type="text/javascript">
    var paramTags = '{{ tagids }}';
</script>
{{ javascript_include("/assets/manage/js/question/edit.js", false) }}
{% endblock %}

{% block content %}
    {{ partial("module/left_question") }}
    <div class="col-xs-10">
        <ol class="breadcrumb">
            <li>问答管理</li>
            <li class="active">编辑问答</li>
        </ol>
        	<form id="form_update"  class="form-horizontal" role="form" method="post" urlList="{{ url.get('question/list') }}" action="" target="ifr_send_file" enctype="multipart/form-data">
            <div class="form-group">
                <label for="question_id" class="col-xs-2 control-label">ID</label>
                <div class="col-xs-9">
                	<p>{{ info.question_id }}</p>
                    <input type="hidden" class="form-control" name="question_id" value="{{ info.question_id }}">
                </div>
            </div>
            
            <div class="form-group">
                <label for="activity_cover" class="col-xs-2 control-label">提问者</label>
                <div class="col-xs-9">                 
                    <input type="text" readonly="readonly" class="form-control" value="{{ user.user_nickname }}" >                  
                </div>
            </div>
            <div class="form-group">
                <label for="activity_cover" class="col-xs-2 control-label">标签</label>
                <div class="col-xs-9">
                	{% for v in alltag %}                
                     <input class="question_tag" type="checkbox" did="{{v.tag_id}}" value="{{v.tag_id}},{{v.tag_title}}" name="question_tag[]"> {{v.tag_title}}
                    {% endfor %}    
                </div>
            </div>
            <div class="form-group">
                <label for="question_browsers" class="col-xs-2 control-label">浏览量</label>
                <div class="col-xs-9">
                    <input type="text" class="form-control" id="question_browsers" name="question_browsers" value="{{ info.question_browsers }}" data-rule="integer[+0]">
                </div>
            </div>
            <div class="form-group">
                <label for="activity_intro" class="col-xs-2 control-label">内容</label>
                <div class="col-xs-9">
                	<textarea class="form-control" style="height:150px;" readonly>{{ info.question_content }}</textarea>
                </div>              
            </div>
            <div class="form-group">
                <label for="activity_intro" class="col-xs-2 control-label">图片</label>
                <div class="col-xs-9">
                	{% for r in info.question_pics %}
                		<a href="javascript:void(0);" class="see_pic" durl="http://img.meelier.com/{{r}}"><img src="http://img.meelier.com/{{r}}" style="width:100px;"/></a>
                	{% endfor %}
                </div>              
            </div>
            <div class="form-group">
                <div class="col-xs-12 text-center">
                    <button id="btn_save" type="submit" class="btn btn-primary"><i class="fa fa-floppy-o fa-lg"></i> 保 存</button>
                </div>
            </div>
        </form>

    </div>
    
    
    
{% endblock %}